-
Notifications
You must be signed in to change notification settings - Fork 43
Conversation
61d50a4
to
39fbbf0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, besides the test and examples issues. The async helpers are a nice touch 👍
And a meta comment: some of the commits here could be squashed.
LGTM. @imiric you raise good points on the tests. I also think we should be checking that |
The callback returned from RegisterCallback should not be run as a goroutine. Since its job is to carry a task to the event loop, the task should be done in a goroutine first, and then let the task call the callback within the goroutine.
Since waitForNavigation is async now.
Since the Click and WaitForNavigation are now async, we don't need to call each in separate goroutines. Instead, we call them in the event loop, and the event loop will take care of async stuff for us.
39fbbf0
to
41ae327
Compare
We can now use Promise.all when we interact with an element that causes a navigation to occur, and so we need to also use waitForNavigation before carrying on to the next steps in the tests. This helps prevent race conditions between clicking and waiting. Resolves: #467 (comment)
We can now use Promise.all when we interact with an element that causes a navigation to occur, and so we need to also use waitForNavigation before carrying on to the next steps in the tests. This helps prevent race conditions between clicking and waiting. Resolves: #467 (comment)
8a9f052
to
886eda5
Compare
The test now checks the state of the promise before passing the test. Resolves: #467 (comment)
The test now checks the state of the promise before passing the test. Resolves: #467 (comment)
d37be91
to
a68a949
Compare
The test now checks the state of the promise before passing the test. Resolves: #467 (comment)
a68a949
to
331465f
Compare
We just want to make sure that the promises actually complete and are fulfilled before we end the test, so we're checking the state of the promise in `tb.await` as well as after `tb.await`. There's a chance that the action has already completed before the first state check, but the resolve/rejection only occurs `tb.await` returns. Resolves: #467 (comment)
We just want to make sure that the promises actually complete and are fulfilled before we end the test, so we're checking the state of the promise in `tb.await` as well as after `tb.await`. There's a chance that the action has already completed before the first state check, but the resolve/rejection only occurs `tb.await` returns. Resolves: #467 (comment)
17f107f
to
262eaee
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, thanks for the changes @ankur22. I left just a few more minor suggestions.
We just want to make sure that the promises actually complete and are fulfilled before we end the test, so we're checking the state of the promise in `tb.await` as well as after `tb.await`. There's a chance that the action has already completed before the first state check, but the resolve/rejection only occurs `tb.await` returns. Resolves: #467 (comment)
e63220b
to
8b23121
Compare
We just want to make sure that the promises actually complete and are fulfilled before we end the test, so we're checking the state of the promise in `tb.await` as well as after `tb.await`. There's a chance that the action has already completed before the first state check, but the resolve/rejection only occurs `tb.await` returns. Resolves: #467 (comment)
This will ensure that the envetloop has complete before starting it up again. We're going to avoid placing lock here, since we want to follow the eventloop API and not allow multiple threads accessing the one eventloop.
8b23121
to
61b84ee
Compare
We shouldn't need the CI specific timeout since the test should now be less flaky and is asynchronous. Resolves: #467 (comment)
We shouldn't need the CI specific timeout since the test should now be less flaky and is asynchronous. Resolves: #467 (comment)
1e9fda0
to
fac54bd
Compare
f510cff
to
3ea0c25
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work @inancgumus and @ankur22! 👏
Please feel free to add additional commits to the PR if you need to and merge it without me.
Note: I would create another PR to fix the problem in
k6ext.promise
, but since I'll be leaving soon, I wanted to pack it in the same PR.Closes #440.